package com.hellowx_ssm.aspactj;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;

/**
 * Created by IntelliJ IDEA.
 *
 * @author MagicMushroom
 * @date 2021/6/26
 */
@Aspect
public class MyAspectj {

    @Pointcut("execution(* com..*.login(..))")
    public void pc1(){};

    @Around("pc1()")
    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
        System.out.println("open");
        Object ret  = joinPoint.proceed();
        System.out.println("close");
        return ret;
    }
}
